import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { Article } from '../share/model/article.model';

@Component({
  selector: 'app-article',
  templateUrl: './article.component.html',
  styleUrls: ['./article.component.scss'],
})
export class ArticleComponent implements OnInit {
  @Input()
  public article: Article;

  constructor() {}

  ngOnInit() {}

  public upvote(): void {
    this.article.upvote();
  }

  public downvote(): void {
    this.article.downvote();
  }

}
